<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>商品详情</title>
    <link rel="stylesheet" href="../css/04.css">
</head>
<body>
<div class="container">
    <div class="product-image">
        <img src="${item.image}">
    </div>

    <div class="product-details">
        <h2>${item.itemName}</h2>
        <div class="price">价格:${item.price}元</div>
        <div class="description">
           配置:${item.description}
        </div>
    </div>

    <div class="add-to-cart">
        <button onclick="add('${item.id}')">添加到购物车</button>
    </div>
</div>

<script>
    function add(id){
        window.location.href="${pageContext.request.contextPath}/shopCart/addOne?iid="+id;
    }
</script>

</body>
</html>